package com.ocom.mqsubsidy.business.subsidydataaddperson.impl;

import com.ocom.mqsubsidy.business.subsidydataaddperson.SubsidyDataAddPersonProductService;
import com.ocom.mqsubsidy.utils.SubsidyDataAddPersonProductUitl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SubsidyDataAddPersonProductServiceImpl implements SubsidyDataAddPersonProductService {

    private final Logger log = LoggerFactory.getLogger(SubsidyDataAddPersonProductService.class);

    @Autowired
    private SubsidyDataAddPersonProductUitl subsidyDataAddPersonProductUitl;

    @Override
    public void handle(String msg) {
        log.info(" SubsidyDataAddPerson-mq-开始【{}】",msg);
        //消息队列调用减库存接口  优先级越高越先执行完

        subsidyDataAddPersonProductUitl.SubsidyDataAddPersonSend(msg,15);

        log.info(" SubsidyDataAddPerson-完成【{}】",msg);
    }
}
